﻿Imports BE.BE
Imports DAL.DAL
Namespace BL
    Public Class Cliente_BL

        Shared Sub altaCliente(pCliente As Cliente_BE)
            Try
                Persona_BL.altaPersona(pCliente)
                DAL_Cliente.altaCliente(pCliente)
            Catch ex As Exception
                Throw ex
            End Try
            
        End Sub

        Shared Sub bajaCliente(pCliente As Cliente_BE)

        End Sub

        Shared Sub modificarCliente(pCliente As Cliente_BE)

        End Sub

        Shared Function listarClientes() As List(Of Cliente_BE)

            Dim mLista As New List(Of Cliente_BE)

            Try
                mLista = DAL_Cliente.listarClientes

                For Each cli As Cliente_BE In mLista

                    cli.Telefonos = Telefono_BL.obtenerTelefonosXIdObjeto(cli.Id, Telefono_BE.EnumTipoObjeto.Persona)

                Next

                Return mLista

            Catch ex As Exception
                Throw ex
            End Try


        End Function



    End Class


End Namespace


